package o;

import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;
import com.huawei.appmarket.service.installdepend.bean.GetDetailByIdResBean;
import com.huawei.appmarket.service.installdepend.bean.GetDetailByIdResBean$DetailInfoBean;
import com.huawei.fastengine.fastview.startFastappEngine.appmarket.DetailBean;
import com.huawei.fastengine.fastview.startFastappEngine.appmarket.IQueryDetailHandler;
import com.huawei.fastengine.fastview.startFastappEngine.appmarket.IQueryDetailResult;
import java.util.List;

public class ejq implements IQueryDetailHandler {

    static class d implements IServerCallBack {
        private IQueryDetailResult ˋ;

        public d(IQueryDetailResult iQueryDetailResult) {
            this.ˋ = iQueryDetailResult;
        }

        public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
        }

        public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
            GetDetailByIdResBean getDetailByIdResBean = (GetDetailByIdResBean) responseBean;
            if (getDetailByIdResBean.getResponseCode() == 0) {
                List ˏ = getDetailByIdResBean.ˏ();
                if (!CollectCheck.isEmpty(ˏ)) {
                    GetDetailByIdResBean$DetailInfoBean getDetailByIdResBean$DetailInfoBean = (GetDetailByIdResBean$DetailInfoBean) ˏ.get(0);
                    if (getDetailByIdResBean$DetailInfoBean != null) {
                        DetailBean detailBean = new DetailBean();
                        detailBean.setDownloadUrl(getDetailByIdResBean$DetailInfoBean.ॱॱ());
                        detailBean.setSha256(getDetailByIdResBean$DetailInfoBean.ˋॱ());
                        detailBean.setPackageName(getDetailByIdResBean$DetailInfoBean.ʻ());
                        detailBean.setVersionCode(getDetailByIdResBean$DetailInfoBean.ˏॱ());
                        this.ˋ.onResult(detailBean);
                        return;
                    }
                }
            }
            this.ˋ.onResult(null);
        }
    }

    public void queryDetail(String str, IQueryDetailResult iQueryDetailResult) {
        cfw.ˎ(new eaj(str), new d(iQueryDetailResult));
    }
}
